﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BitPortal.Models;
using BitPortal.Utils;


namespace BitPortal.Business
{
    public static partial class NoteGroupBLL
    {
        public static long InsertNoteGroup()
        {
            ExtendedBitPortalEntities ent = new ExtendedBitPortalEntities();
            long currentMax=ent.NoteGroups.Max(pp => pp.NoteGroupID);
            ent.NoteGroups.AddObject(new NoteGroup(){NoteGroupID=currentMax+1, LastNoteDate=null });
            ent.SaveChanges();
            return currentMax + 1;
        }
    }
}